/**
 * Convert RemoteExceptions to RuntimeRemoteException 
 * and log them. Enable clients that don't handle
 * RemoteException. 
 */
aspect HandleRemoteException {
    /**
     * Declare RemoteException soft to enable use by clients 
     * that are not declared to handle RemoteException. 
     */
    declare soft: RemoteException throwsRemoteException(); /***** MISSING ':' *****/

    /**
     * Pick out join points to convert RemoteException to 
     * RuntimeRemoteException.
     * This implementation picks out
     * execution of any method declared to throw RemoteException
     * in our library.
     */
    pointcut throwsRemoteException(): within(com.company.lib..*)
       && execution(* *(..) throws RemoteException+);

    /** 
     * This around advice converts RemoteException to
     * RuntimeRemoteException at all join points picked out
     * by throwsRemoteException().
     * That means *no* RemoteException will be thrown from
     * this join point, and thus that none will be converted
     * by the AspectJ runtime to SoftException.
     */
    Object around(): throwsRemoteException() {
        try {
            return proceed();
        } catch (RemoteException re) {
            re.printStackTrace(System.err);
            throw new RuntimeRemoteException(re);
        }
    }
}